package com.cgsrp.cgsrp_shopping.dao;

import com.cgsrp.cgsrp_shopping.domain.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    List<Product> list(@Param("userId") int userId, @Param("searchKey") String searchKey);

    int del(Integer productId);

    int up(Integer productId);

    List<Product> buyList(String searchKey);

    void updateNumber(Product product);

}
